{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tushare as ts  \n",
    "import pandas as pd  \n",
    "from sqlalchemy import create_engine  \n",
    "import sqlalchemy\n",
    "import mysql.connector\n",
    "try:\n",
    "    conn = mysql.connector.connect(user='diagnose_report', password='launch@1234',\n",
    "                                   host='rm-wz9v9e07mh753tk321o.mysql.rds.aliyuncs.com',\n",
    "                                   database='car_spider')\n",
    "except mysql.connector.Error as err:\n",
    "    if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:\n",
    "        print(\"Something is wrong with your user name or password\")\n",
    "    elif err.errno == errorcode.ER_BAD_DB_ERROR:\n",
    "        print(\"Database does not exist\")\n",
    "    else:\n",
    "        print(err)\n",
    "cursor = conn.cursor()\n",
    "cursor.execute(\"select notice_type,brand,curb_weight,Wheelbase,car_length,car_width,car_height,Displacement,power,replace(vin,'/r',','),car_factory from bssoz_notice_jc\")\n",
    "results = cursor.fetchall()\n",
    "jc = pd.DataFrame(results,columns=['notice_type','brand','curb_weight','Wheelbase','car_length','car_width','car_height','Displacement','power','vin','car_factory'])\n",
    "cursor.execute(\"select notice_type,brand,curb_weight,Wheelbase,car_length,car_width,car_height,Displacement,power,replace(vin,'/r',','),car_factory from bssoz_notice_suv\")\n",
    "results = cursor.fetchall()\n",
    "suv = pd.DataFrame(results,columns=['notice_type','brand','curb_weight','Wheelbase','car_length','car_width','car_height','Displacement','power','vin','car_factory'])\n",
    "suv = suv.drop([8682,8723,8857,8858,9948,9949,10086,10202,10341,10342,10343,10361,10386])\n",
    "all1 = jc.append(suv)\n",
    "cursor.execute(\"select `factory`,`brand`,`style`,`style_1`,`长×宽×高[mm]`,`轴距[mm]`,`整备质量[kg]`,`engine_displacement`,`最大功率[kW]` from car_price_detail\")\n",
    "results = cursor.fetchall()\n",
    "price = pd.DataFrame(results,columns=['factory','brand','style','style_1','长×宽×高[mm]','轴距[mm]','整备质量[kg]','engine_displacement','最大功率[kW]'])\n",
    "cursor.execute(\"select `厂商`,`品牌`,`车系`,`车型`,`长×宽×高[mm]`,`轴距[mm]`,`整备质量[kg]`,`排量(mL)`,`最大功率[kW]` from car_price_detail_stop\")\n",
    "results = cursor.fetchall()\n",
    "price2 = pd.DataFrame(results,columns=['factory','brand','style','style_1','长×宽×高[mm]','轴距[mm]','整备质量[kg]','engine_displacement','最大功率[kW]'])\n",
    "cursor.execute(\"select `厂商`,`品牌`,`车系`,`车型`,`长×宽×高[mm]`,`轴距[mm]`,`整备质量[kg]`,`排量(mL)`,`最大功率[kW]` from car_price_detail_stop_1\")\n",
    "results = cursor.fetchall()\n",
    "price3 = pd.DataFrame(results,columns=['factory','brand','style','style_1','长×宽×高[mm]','轴距[mm]','整备质量[kg]','engine_displacement','最大功率[kW]'])\n",
    "price = price.append(price2)\n",
    "price = price.append(price3)\n",
    "conn.commit()\n",
    "cursor.close()\n",
    "conn.close()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {},
   "outputs": [],
   "source": [
    "vin2 = pd.DataFrame(columns=['vin','car_factory','brand','style'])\n",
    "ss=['宝马']\n",
    "for i in ss:\n",
    "    \n",
    "    LSG_price = price[(price['brand']==i)|(price['brand']=='之诺')]\n",
    "    LSG_price = LSG_price[LSG_price['factory']!='进口丰田>>']\n",
    "\n",
    "    \n",
    "    LSG = all1[(all1['brand']==i)|(all1['brand']=='宝马(BMW)')]\n",
    "    LSG_price = LSG_price[(LSG_price['长×宽×高[mm]']!='')]\n",
    "    LSG_price['curb_weight'] =LSG_price['整备质量[kg]']\n",
    "    LSG_price = LSG_price.groupby(['轴距[mm]','长×宽×高[mm]','brand','style'])['factory'].count().reset_index()\n",
    "    LSG_price['car_length'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[0])\n",
    "    LSG_price['car_width'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[1])\n",
    "    LSG_price['car_height'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[2])\n",
    "    LSG_price['Wheelbase'] =LSG_price['轴距[mm]']\n",
    "\n",
    "\n",
    "    result = LSG.merge(LSG_price,on=['car_length','car_width','Wheelbase','car_height'])\n",
    "    import re\n",
    "    vin1 = []\n",
    "    for a,i in result.iterrows():\n",
    "        a = re.findall(r'L[0-9A-Za-z]{7}×××××××××',i['vin'])\n",
    "        for j in a:\n",
    "            vin = []\n",
    "            vin.append(j)\n",
    "            vin.append(i['car_factory'].split(',')[0])\n",
    "            vin.append(i['brand_y'].split(',')[0])\n",
    "            vin.append(i['style'].split(',')[0])\n",
    "            vin1.append(vin)\n",
    "    vin = pd.DataFrame(vin1,columns=['vin','car_factory','brand','style'])\n",
    "    vin = vin.drop_duplicates()\n",
    "    vin2 = vin2.append(vin)\n",
    "    \n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "vin2.to_csv('宝马.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['宝马'], dtype=object)"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vin2.brand.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [],
   "source": [
    "LSG_price = price[(price['brand']=='奔驰')]\n",
    "LSG_price = LSG_price[LSG_price['factory']!='进口丰田>>']\n",
    "\n",
    "all1['3']=all1['vin'].apply(lambda x :x[:3])\n",
    "LSG = all1[(all1['3']=='LE4')|(all1['3']=='LB1')]\n",
    "LSG_price = LSG_price[(LSG_price['长×宽×高[mm]']!='')]\n",
    "LSG_price['curb_weight'] =LSG_price['整备质量[kg]']\n",
    "LSG_price = LSG_price.groupby(['轴距[mm]','长×宽×高[mm]','brand','style'])['factory'].count().reset_index()\n",
    "LSG_price =LSG_price.drop([187,188])\n",
    "LSG_price['car_length'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[0])\n",
    "LSG_price['car_width'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[1])\n",
    "LSG_price['car_height'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[2])\n",
    "LSG_price['Wheelbase'] =LSG_price['轴距[mm]']\n",
    "\n",
    "\n",
    "result = LSG.merge(LSG_price,on=['car_length','car_width','Wheelbase','car_height'])\n",
    "import re\n",
    "vin1 = []\n",
    "for a,i in result.iterrows():\n",
    "    a = re.findall(r'L[0-9A-Za-z]{7}×××××××××',i['vin'])\n",
    "    for j in a:\n",
    "        vin = []\n",
    "        vin.append(j)\n",
    "        vin.append(i['car_factory'].split(',')[0])\n",
    "        vin.append(i['brand_y'].split(',')[0])\n",
    "        vin.append(i['style'].split(',')[0])\n",
    "        vin1.append(vin)\n",
    "vin = pd.DataFrame(vin1,columns=['vin','car_factory','brand','style'])\n",
    "vin = vin.drop_duplicates()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [],
   "source": [
    "vin.to_csv('奔驰.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {},
   "outputs": [],
   "source": [
    "LSG_price = price[(price['brand']=='一汽')|(price['brand']=='红旗')|(price['brand']=='奔腾')|(price['brand']=='欧朗')]\n",
    "LSG_price = LSG_price[LSG_price['factory']!='进口丰田>>']\n",
    "\n",
    "all1['3']=all1['vin'].apply(lambda x :x[:3])\n",
    "LSG = all1[(all1['3']=='LFB')|(all1['3']=='LFP')]\n",
    "LSG_price = LSG_price[(LSG_price['长×宽×高[mm]']!='')]\n",
    "LSG_price['curb_weight'] =LSG_price['整备质量[kg]']\n",
    "LSG_price = LSG_price.groupby(['轴距[mm]','长×宽×高[mm]','brand','style'])['factory'].count().reset_index()\n",
    "\n",
    "LSG_price['car_length'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[0])\n",
    "LSG_price['car_width'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[1])\n",
    "LSG_price['car_height'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[2])\n",
    "LSG_price['Wheelbase'] =LSG_price['轴距[mm]']\n",
    "\n",
    "\n",
    "result = LSG.merge(LSG_price,on=['car_length','car_width','Wheelbase','car_height'])\n",
    "import re\n",
    "vin1 = []\n",
    "for a,i in result.iterrows():\n",
    "    a = re.findall(r'L[0-9A-Za-z]{7}×××××××××',i['vin'])\n",
    "    for j in a:\n",
    "        vin = []\n",
    "        vin.append(j)\n",
    "        vin.append(i['car_factory'].split(',')[0])\n",
    "        vin.append(i['brand_y'].split(',')[0])\n",
    "        vin.append(i['style'].split(',')[0])\n",
    "        vin1.append(vin)\n",
    "vin = pd.DataFrame(vin1,columns=['vin','car_factory','brand','style'])\n",
    "vin = vin.drop_duplicates()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['红旗', '一汽', '奔腾', '欧朗'], dtype=object)"
      ]
     },
     "execution_count": 175,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "result.brand_y.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {},
   "outputs": [],
   "source": [
    "vin.to_csv('一汽_vin.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "metadata": {},
   "outputs": [],
   "source": [
    "LSG_price = price[(price['brand']=='斯柯达')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['上汽大众斯柯达>>', '进口斯柯达>>', '上汽大众斯柯达', '斯柯达'], dtype=object)"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LSG_price.factory.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "LSG_price = price[(price['brand']=='五菱')]\n",
    "\n",
    "\n",
    "\n",
    "LSG = all1[(all1['brand']=='五菱')]\n",
    "LSG_price = LSG_price[(LSG_price['长×宽×高[mm]']!='')]\n",
    "LSG_price['curb_weight'] =LSG_price['整备质量[kg]']\n",
    "LSG_price = LSG_price.groupby(['轴距[mm]','长×宽×高[mm]','brand','style'])['factory'].count().reset_index()\n",
    "LSG_price['car_length'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[0])\n",
    "LSG_price['car_width'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[1])\n",
    "LSG_price['car_height'] = LSG_price['长×宽×高[mm]'].apply(lambda x:x.split('x')[2])\n",
    "LSG_price['Wheelbase'] =LSG_price['轴距[mm]']\n",
    "\n",
    "\n",
    "result = LSG.merge(LSG_price,on=['car_length','car_width','Wheelbase','car_height'])\n",
    "import re\n",
    "vin1 = []\n",
    "for a,i in result.iterrows():\n",
    "    a = re.findall(r'L[0-9A-Za-z]{7}×××××××××',i['vin'])\n",
    "    for j in a:\n",
    "        vin = []\n",
    "        vin.append(j)\n",
    "        vin.append(i['car_factory'].split(',')[0])\n",
    "        vin.append(i['brand_y'].split(',')[0])\n",
    "        vin.append(i['style'].split(',')[0])\n",
    "        vin1.append(vin)\n",
    "vin = pd.DataFrame(vin1,columns=['vin','car_factory','brand','style'])\n",
    "vin = vin.drop_duplicates()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {},
   "outputs": [],
   "source": [
    "vin.to_csv('比速.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>vin</th>\n",
       "      <th>car_factory</th>\n",
       "      <th>brand</th>\n",
       "      <th>style</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏310</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>LZWAEAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏330</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>LZWAEAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>LZWAEAGB×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>LZWADAGB×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏310W</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>107</th>\n",
       "      <td>LZWADAGB×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>114</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120</th>\n",
       "      <td>LZWADAGB×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>宝骏</td>\n",
       "      <td>宝骏510</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   vin     car_factory brand   style\n",
       "0    LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏310\n",
       "2    LZWAEAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏330\n",
       "5    LZWAEAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏630\n",
       "44   LZWAEAGB×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏630\n",
       "53   LZWADAGB×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏530\n",
       "54   LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏530\n",
       "86   LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏  宝骏310W\n",
       "97   LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏360\n",
       "103  LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏730\n",
       "107  LZWADAGB×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏730\n",
       "114  LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏560\n",
       "120  LZWADAGB×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏560\n",
       "121  LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    宝骏   宝骏510"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>vin</th>\n",
       "      <th>car_factory</th>\n",
       "      <th>brand</th>\n",
       "      <th>style</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱宏光S3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱宏光S</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>LZWACAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱荣光</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>LZWACAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱之光</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱之光V</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱宏光S1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>246</th>\n",
       "      <td>LZWADAGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱荣光V</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>282</th>\n",
       "      <td>LZWACAFA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>五菱荣光</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>328</th>\n",
       "      <td>LZWACBGB×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>征程</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>329</th>\n",
       "      <td>LZWACAGB×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>征程</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>330</th>\n",
       "      <td>LZWACBGA×××××××××</td>\n",
       "      <td>上汽通用五菱汽车股份有限公司</td>\n",
       "      <td>五菱</td>\n",
       "      <td>征程</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   vin     car_factory brand   style\n",
       "0    LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱  五菱宏光S3\n",
       "13   LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱   五菱宏光S\n",
       "23   LZWACAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱    五菱荣光\n",
       "54   LZWACAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱    五菱之光\n",
       "84   LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱   五菱之光V\n",
       "90   LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱  五菱宏光S1\n",
       "246  LZWADAGA×××××××××  上汽通用五菱汽车股份有限公司    五菱   五菱荣光V\n",
       "282  LZWACAFA×××××××××  上汽通用五菱汽车股份有限公司    五菱    五菱荣光\n",
       "328  LZWACBGB×××××××××  上汽通用五菱汽车股份有限公司    五菱      征程\n",
       "329  LZWACAGB×××××××××  上汽通用五菱汽车股份有限公司    五菱      征程\n",
       "330  LZWACBGA×××××××××  上汽通用五菱汽车股份有限公司    五菱      征程"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
